#include <iostream>
using namespace std;
typedef long long LL;
#define endl '\n'
void solve() 
{
    int n; cin >> n;
    int cnt = 1;
    int pre; cin >> pre;
    for(int i = 2; i <= n; i++)
    {
        int x; cin >> x;
        if(x - pre > 1) 
        {
            cnt++;
            pre = x;
        }
    }
    cout << cnt << endl;
}

int main()
{
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int T;
	cin >> T;
	while(T--)
	{
        solve();
	}
	return 0;
}